--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit a888a17b7e91cfbf97f7cac04b04b6d29a29c2f0
Parents : fa3b1ff
Author : Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-04-12T14:39:29-05:00
fix(message_handler): remove conversation read state when deleting a conversation
Changes
Diff
diff --git a/meshchatx/src/backend/message_handler.py b/meshchatx/src/backend/message_handler.py
index 65625c3d..4c3d257a 100644
--- a/meshchatx/src/backend/message_handler.py
+++ b/meshchatx/src/backend/message_handler.py
@@ -41,6 +41,10 @@ class MessageHandler:
def delete_conversation(self, local_hash, destination_hash):
query = "DELETE FROM lxmf_messages WHERE peer_hash = ?"
self.db.provider.execute(query, [destination_hash])
+ self.db.provider.execute(
+ "DELETE FROM lxmf_conversation_read_state WHERE destination_hash = ?",
+ [destination_hash],
+ )
# Also clean up folder mapping
self.db.provider.execute(
"DELETE FROM lxmf_conversation_folders WHERE peer_hash = ?",
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────